#include <iostream>
#include <sstream>
#include <ncurses.h>
#include <stdlib.h>
#include <time.h>

#include "output.h"
#include "map.h"
#include "input.h"
#include "movable.h"

#define DEBUG 1

Screen* S;
Map* M;
Keyboard* K;
Loader* L;
Saver* save;

int main()
{
  stringstream st;
  srand( time(NULL) );

  M = new Map();
  S = new Screen(M);
  K = new Keyboard(M,S);
  L = new Loader("test.sav",M,K);

  S->mapPrint();
  S->mesPrint();
  S->statPrint();

  int status = 0;

  M->start();

/*  while (status != -1)
  {
    K->makeMove();
    if (status != 0 || DEBUG == 1)
    {
      S->addMessage(K->getMessage().c_str());
      S->mesPrint();
      S->mapPrint();
    }
    status = K->getStatus();
  }*/

  save = new Saver("test.sav", M);
  getch();

  S->end();

  return 0;
}
